package com.miao.controller;

import com.miao.dto.CourseCategoryDto;
import com.miao.service.ICourseCategoryService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@Slf4j
@RestController
@RequestMapping("/content")
public class CategoryController {
    @Autowired
    private ICourseCategoryService iCourseCategoryService;
    //查询课程分类信息
    @GetMapping("/course-category/tree-nodes")
    public List<CourseCategoryDto> queryCategory(){
        log.info("进行课程分类查询！！");
        return iCourseCategoryService.queryCategoryOfCourese("1");
    }
}
